<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Title</title>
    
    <style>
      .card {
        border: 1px gray solid;
        border-radius: 10px;
        padding: 15px;
      }
      
      .card-title {
        font-size: 15px;
        font-weight: bold;
        margin: 10px;
      }
      
      .card-body > div {
        color: darkgray;
        background: pink;
        margin: 10px;
        width: 600px;
        height: 100px;
      }
    </style>
  </head>
  <body>
    <!--flex属性设置flex项大小，其属性值可为比例值或最小值。比例值表示每个flex项占用flex容器的比例，最小值表示flex项最初大小-->
    <div class="card">
      <div class="card-title"> 为唯一flex项设置`flex: 1`或`flex: 100`则该flex项占据全部可用空间</div>
      <div class="card-body" style="display: flex">
        <div style="flex: 100">100</div>
      </div>
    </div>
    <br>
    <div class="card">
      <div class="card-title"> 为两个flex项分别设置`flex: 1`和`flex: 2`则两个flex项占据可用空间的比例为1:2</div>
      <div class="card-body" style="display: flex">
        <div style="flex: 1">1</div>
        <div style="flex: 2">2</div>
      </div>
    </div>
    <br>
    <div class="card">
      <div class="card-title">最小值表示flex项最初大小，剩余空间按照比例划分</div>
      <div class="card-body" style="display: flex">
        <div style="flex: 1000px">1000px</div>
        <div style="flex: 1">1</div>
        <div style="flex: 2">2</div>
      </div>
    </div>
  </body>
</html>